package com.zhn.evsi.client;

import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Request;
import com.dtflys.forest.annotation.Retry;
import com.dtflys.forest.annotation.Var;
import com.zhn.evsi.interceptor.TokenInterceptor;

import java.util.List;

/**
 * 行星开发
 * */

@BaseRequest(baseURL = "${eveData}${eveDataSns}")
@Retry(maxRetryCount = "3", maxRetryInterval = "1000")
public interface PlanetSchematicsClient {

    /**
     * 获取殖民地id
     * */
    // https://esi.evetech.net/latest/characters/2119634223/planets/?datasource=tranquility&token=1%7CCfDJ8MrqJPYQd2lPo1rpmlAzyLWda3BLvlo0IGqvM6CoDDbHcj5yEpGHn7%2B1ypULSVn5DzfVRtuABHNq%2BbhbwHkfKqfn8NX62SWqErSunJ5U1QESt3G8Lg3KiQsZP16nsapWfUtYtBQC8Ieq6p8Xn6o9Us7LRI529XmLCrO06qpR4Dzk
    @Request(
            url = "/characters/{characters}/planets/?datasource=tranquility",
            type = "GET",
            interceptor = TokenInterceptor.class
    )
    List<JSONObject> planetColonies(@Var("characters") Long characters);


    /**
     * 获取殖民地布局
     * */
    // https://esi.evetech.net/latest/characters/{character_id}/planets/{planet_id}/?datasource=tranquility&token=1%7CCfDJ8MrqJPYQd2lPo1rpmlAzyLWda3BLvlo0IGqvM6CoDDbHcj5yEpGHn7%2B1ypULSVn5DzfVRtuABHNq%2BbhbwHkfKqfn8NX62SWqErSunJ5U1QESt3G8Lg3KiQsZP16nsapWfUtYtBQC8Ieq6p8Xn6o9Us7LRI529XmLCrO06qpR4Dzk
    @Request(
            url = "/characters/{characters}/planets/{planetId}/?datasource=tranquility",
            type = "GET",
            interceptor = TokenInterceptor.class
    )
    JSONObject planetColoniesLayout(@Var("characters") Long characters, @Var("planetId") Integer planetId);

}
